"rustc-serialize 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"semver 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"tar 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "term 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
+[[package]]
+name = "term"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "log 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
[[package]]
name = "time"
version = "0.1.5"
"Carl Lerche <me@carllerche.com>",
"Alex Crichton <alex@alexcrichton.com>"]
+[profile.test]
+debug = false
+[profile.dev]
+debug = false
+
[lib]
name = "cargo"
path = "src/cargo/lib.rs"
docopt = "0.6.19"
url = "0.2.7"
rustc-serialize = "0.1.5"
+term = "0.1"
[dev-dependencies.hamcrest]
git = "https://github.com/carllerche/hamcrest-rust.git"
#![crate_name="cargo"]
#![crate_type="rlib"]
-#![feature(macro_rules, phase)]
-#![feature(default_type_params)]
+#![feature(macro_rules, phase, default_type_params, unboxed_closures)]
#![deny(unused)]
#![cfg_attr(test, deny(warnings))]
fn with_authentication<T>(url: &str,
cfg: &git2::Config,
- f: |git2::Credentials| -> CargoResult<T>)
+ f: |&mut git2::Credentials| -> CargoResult<T>)
-> CargoResult<T> {
// Prepare the authentication callbacks.
//
let mut cred_helper = git2::CredentialHelper::new(url);
cred_helper.config(cfg);
let mut cred_error = false;
- let ret = f(|url, username, allowed| {
+ let ret = f(&mut |&mut: url, username, allowed| {
let creds = if allowed.contains(git2::SSH_KEY) {
let user = username.map(|s| s.to_string())
.or_else(|| cred_helper.username.clone())
// Create a local anonymous remote in the repository to fetch the url
with_authentication(url, &try!(repo.config()), |f| {
- let mut cb = git2::RemoteCallbacks::new()
- .credentials(f);
- let mut remote = try!(repo.remote_anonymous(url.as_slice(), refspec));
+ let mut cb = git2::RemoteCallbacks::new();
+ cb.credentials(|a, b, c| f.call_mut((a, b, c)));
+ let mut remote = try!(repo.remote_anonymous(url.as_slice(),
+ Some(refspec)));
try!(remote.add_fetch("refs/tags/*:refs/tags/*"));
remote.set_callbacks(&mut cb);
try!(remote.fetch(&["refs/tags/*:refs/tags/*", refspec], None, None));
+2014-12-30
+ linux-i386 ab8bba0918d3d2ddbd7fd21f147e223dbf04cece
+ linux-x86_64 0efe0f7bcbcbeb5494affcc8a2207db448a08c45
+ macos-i386 e5097005b0a27c186b8edee24982fd4c3ebba81e
+ macos-x86_64 6c0bb776e5645fb93b67341b111c715f39b25511
+ winnt-i386 2088c5256445b5bb2da57a71f6a9671e5a280477
+ winnt-x86_64 950e25bcedc5ba9d96891523c9967f81d5f6c74d
+
2014-12-21
linux-i386 4dea04e278192c5409f43794a98f20a8f59df2d9
linux-x86_64 3e48c573d3c4d26591feb7bfe988174720f08374
{doctest} bar
-running 0 tests
+running 1 test
+test bar_0 ... ok
-test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
",
compiling = COMPILING, running = RUNNING,
{doctest} syntax
-running 0 tests
+running 1 test
+test foo_0 ... ok
-test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
",
compiling = COMPILING, running = RUNNING,